﻿<%@ Page Title="" Language="C#" MasterPageFile="~/LoginMaster.Master" AutoEventWireup="true" CodeBehind="Register.aspx.cs" Inherits="myWallet.Register1" meta:resourcekey="PageResource" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div id="pnMessage" runat="server" visible="false" class="message">
    </div>
    <table width="100%">
        <tr>
            <td width="100px">
                <%= GetGlobalResourceObject("Common", "YourName")%>
            </td>
            <td>
                <asp:TextBox ID="txtName" runat="server" CssClass="TextBox" Width="220px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="requiredName" runat="server" ControlToValidate="txtName"
                    CssClass="failureNotification" Display="Dynamic" Font-Size="12px"
                    SetFocusOnError="True" ValidationGroup="GroupRegisterValid" 
                    ForeColor="Red" meta:resourcekey="requiredName"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
                <%= GetGlobalResourceObject("Common", "Email")%>
            </td>
            <td>
                <asp:TextBox ID="txtEmail" runat="server" CssClass="TextBox" Width="220px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="requiredEmail" runat="server" ControlToValidate="txtEmail"
                    CssClass="failureNotification" Display="Dynamic" Font-Size="12px"
                    SetFocusOnError="True" ValidationGroup="GroupRegisterValid" 
                    ForeColor="Red" meta:resourcekey="requiredEmail"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="regularEmail" runat="server" ControlToValidate="txtEmail"
                    ForeColor="Red" SetFocusOnError="True" Display="Dynamic" Font-Size="12px"
                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                    ValidationGroup="GroupRegisterValid" 
                    meta:resourcekey="regularEmail"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
                <%= GetGlobalResourceObject("Common", "Password")%>
            </td>
            <td>
                <asp:TextBox ID="txtPassword" runat="server" CssClass="TextBox" TextMode="Password" Width="220px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="requiredPassword" runat="server" ControlToValidate="txtPassword"
                    CssClass="failureNotification" Display="Dynamic" Font-Size="12px"
                    SetFocusOnError="True" ValidationGroup="GroupRegisterValid" 
                    ForeColor="Red" meta:resourcekey="requiredPassword"></asp:RequiredFieldValidator>
                <br />
                <asp:RegularExpressionValidator ID="regularPassword" runat="server" ControlToValidate="txtPassword"
                    ValidationExpression="([a-zA-Z0-9_]{5,30})+"
                    ValidationGroup="GroupRegisterValid" ForeColor="Red" Display="Dynamic" 
                    Font-Size="12px" SetFocusOnError="True" 
                    meta:resourcekey="regularPassword"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
                <%= GetGlobalResourceObject("Common", "Confirm")%>
            </td>
            <td>
                <asp:TextBox ID="txtConfirmPassword" runat="server" CssClass="TextBox" TextMode="Password" Width="220px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="requiredConfirmPassword" runat="server" ControlToValidate="txtConfirmPassword"
                    CssClass="failureNotification" Display="Dynamic" Font-Size="12px"
                    SetFocusOnError="True" ValidationGroup="GroupRegisterValid" 
                    ForeColor="Red" meta:resourcekey="requiredRegisterConfirmPassword">*</asp:RequiredFieldValidator>
                <br />
                <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="txtPassword"
                    ControlToValidate="txtConfirmPassword" Display="Dynamic"
                    ValidationGroup="GroupRegisterValid" ForeColor="Red" Font-Size="12px" 
                    SetFocusOnError="True" meta:resourcekey="PasswordCompare"></asp:CompareValidator>
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                <asp:CheckBox ID="ckbAgree" runat="server" meta:resourcekey="ckbAgree" Font-Size="12px" Checked="true" />
            </td>
        </tr>
    </table>
    <div style="text-align: center; margin-top: 20px;">
        <asp:Button ID="btnRegister" runat="server" 
            CssClass="ButtonGreen" ValidationGroup="GroupRegisterValid" Width="100px"
            meta:resourcekey="btnRegister" onclick="btnRegister_Click"/>
    </div>
</asp:Content>
